﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ViewMasterPage1.Master" Inherits="System.Web.Mvc.ViewPage<ComputerShopE3.Models.CPU>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Chỉnh sửa</h2>

    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Các trường</legend>
            
            <%if (ViewData["error"] == null)
              Html.RenderPartial("EditProductPartialView", Model.SAN_PHAM);
          else
          %>
           <%=ViewData["error"]%>
           
<%--            <p>
                <label for="id">id:</label>
                <%= Html.TextBox("linhkien.id", Model.id) %>
                <%= Html.ValidationMessage("id", "*") %>
            </p>--%>
            <p>
                <label for="Socket">Socket:</label>
                <%= Html.TextBox("linhkien.Socket", Model.Socket) %>
                <%= Html.ValidationMessage("Socket", "*") %>
            </p>
            <p>
                <label for="Bus">Bus:</label>
                <%= Html.TextBox("linhkien.Bus", Model.Bus) %>
                <%= Html.ValidationMessage("Bus", "*") %>
            </p>
            <p>
                <label for="Cache">Cache:</label>
                <%= Html.TextBox("linhkien.Cache", Model.Cache) %>
                <%= Html.ValidationMessage("Cache", "*") %>
            </p>
            <p>
                <label for="Speed">Speed:</label>
                <%= Html.TextBox("linhkien.Speed", Model.Speed) %>
                <%= Html.ValidationMessage("Speed", "*") %>
            </p>
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("Trở lại danh mục", "Index") %>
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PersonalMenu" runat="server">
    <title>CPU</title>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <title>Edit</title>
</asp:Content>

